package org.example.controller;


import org.example.service.DomainService;
import org.example.util.JsonData;
import org.example.vo.DomainVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 谢超
 * @since 2023-08-21
 */
@RestController
@RequestMapping("/api/domain/v1")
public class DomainController {

    @Resource
    private DomainService domainService;




    /**
     * 列举domain全部数据（官方域名+自定义域名）
     * @return
     */
    @GetMapping("getDomainList")
    public JsonData getDomainList() {
        List<DomainVO> domainList = domainService.getDomainAllList();
        return JsonData.buildSuccess(domainList);
    }

}

